package com.neutech.entity;

import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Objects;


public class User implements Serializable {
private Integer id;
private String name;
private String password;
private String phone;
private String address;
private Timestamp creatTime;
private Timestamp upDATEtIME;
//当前用户状态
private int status;

    public User(Integer id, String name, String password, String phone, String address, Timestamp creatTime, Timestamp upDATEtIME, int status) {
        this.id = id;
        this.name = name;
        this.password = password;
        this.phone = phone;
        this.address = address;
        this.creatTime = creatTime;
        this.upDATEtIME = upDATEtIME;
        this.status = status;
    }
    public User(){
    }

    public User(String name, String password, String phone, String address) {
        this.name = name;
        this.password = password;
        this.phone = phone;
        this.address = address;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Timestamp getCreatTime() {
        return creatTime;
    }

    public void setCreatTime(Timestamp creatTime) {
        this.creatTime = creatTime;
    }

    public Timestamp getUpDATEtIME() {
        return upDATEtIME;
    }

    public void setUpDATEtIME(Timestamp upDATEtIME) {
        this.upDATEtIME = upDATEtIME;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        User user = (User) o;
        return status == user.status &&
                id.equals(user.id) &&
                name.equals(user.name) &&
                password.equals(user.password) &&
                phone.equals(user.phone) &&
                address.equals(user.address) &&
                creatTime.equals(user.creatTime) &&
                upDATEtIME.equals(user.upDATEtIME);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name, password, phone, address, creatTime, upDATEtIME, status);
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", password='" + password + '\'' +
                ", phone='" + phone + '\'' +
                ", address='" + address + '\'' +
                ", creatTime=" + creatTime +
                ", upDATEtIME=" + upDATEtIME +
                ", status=" + status +
                '}';
    }
}
